package com.utils;

import java.util.List;

import org.hibernate.Query;

import com.bean.SongCreate;

public class SearchWonderful {
	private static SongCreate songCreate;
	private static List<SongCreate> songcreatelist;
	public static List<SongCreate> search(String s){
		/* 查询并返回结果集 */
		HibCommons.OpenQuery();
		String hql = "FROM SongCreate oc WHERE oc.title = :title";
		Query query = HibCommons.getSession().createQuery(hql);
		query.setParameter("title", s);
		songcreatelist = query.list();
		HibCommons.CloseQuery();
		return songcreatelist;

	}
	public static SongCreate getSongCreate() {
		return songCreate;
	}
	public static void setSongCreate(SongCreate songCreate) {
		SearchWonderful.songCreate = songCreate;
	}
	public static List<SongCreate> getSongcreatelist() {
		return songcreatelist;
	}
	public static void setSongcreatelist(List<SongCreate> songcreatelist) {
		SearchWonderful.songcreatelist = songcreatelist;
	}
	
	

}
